import { initRouter } from '~/router'
import { envType } from '../../build/env/globalVar'
import uiVite from '../plugin/uiVite'
import { Scope } from 'tools-vue3'

export default class Config {
    /**
     * 环境变量
     */
    static env: envType = {} as any

    static init = async (app: any) => {
        Scope.CEventBean = CEventBean
        Scope.TimerBean = TimerBean
        Config.env = JSON.parse('#{env}')

        app.use(uiVite)
        app.use(initRouter())

        app.mount('#app')
    }
}
